Added back the printing of perfc arrays & histograms, under compile-time
control in xen/Rules.mk
verbose ?= n
debug ?= n
perfc ?= n
+perfc_arrays?= n
trace ?= n
optimize ?= y
domu_debug ?= n
ifeq ($(perfc),y)
CFLAGS += -DPERF_COUNTERS
+ifeq ($(perfc_arrays),y)
+CFLAGS += -DPERF_ARRAYS
+endif
endif
ifeq ($(trace),y)
for ( j = sum = 0; j < perfc_info[i].nr_elements; j++ )
sum += atomic_read(&counters[j]);
printk("TOTAL[%10d] ", sum);
+#ifdef PERF_ARRAYS
+ for ( j = 0; j < perfc_info[i].nr_elements; j++ )
+ {
+ if ( (j != 0) && ((j % 4) == 0) )
+ printk("\n ");
+ printk("ARR%02d[%10d] ", j, atomic_read(&counters[j]));
+ }
+#endif
counters += j;
break;
}
* Histogram: special treatment for 0 and 1 count. After that equally spaced
* with last bucket taking the rest.
*/
+#ifdef PERFC_ARRAYS
#define perfc_incr_histo(_x,_v,_n) \
do { \
if ( (_v) == 0 ) \
else \
perfc_incra(_x, PERFC_MAX_ ## _n - 1); \
} while ( 0 )
+#else
+#define perfc_incr_histo(_x,_v,_n) ((void)0)
+#endif
#else /* PERF_COUNTERS */